package flyshoes;

import flyshoes.config.OpenFeignConfig;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.openfeign.EnableFeignClients;

@MapperScan("flyshoes.mybatis.mapper")
@EnableCaching//开启缓存
@EnableFeignClients(basePackages = "flyshoes.service",defaultConfiguration = OpenFeignConfig.class )
//让 Spring 容器扫描指定包下的所有 Feign 客户端接口，并为它们生成实现
//这些接口需要用 @FeignClient 注解标记，以便 Feign 知道这些接口是用于远程调用的客户端。
//使OpenFeignConfig.class生效，使OpenFeifn将userId完成远程调用
@SpringBootApplication
public class OrderServiceApp {
    public static void main(String[] args) {
        SpringApplication.run(OrderServiceApp.class,args);
    }
}